home *** CD-ROM | disk | FTP | other *** search
/ Floppyshop 2 / Floppyshop - 2.zip / Floppyshop - 2.iso / diskmags / 0022-3.564 / dmg-3421 / gfa_basi.c / stopazak.txt / stopazak.txt
Text File  |  1997-06-21  |  3KB  |  90 lines

  1. JEDI MUSAX PLAYER 
  2.  
  3. .THE BEST WAY TO PLAY JEDI'S CHIP-MUZAXX
  4.  
  5. by JEDI himself...
  6.  
  7.  
  8.  
  9.  
  10. In the previous issue of dis disk-magazine, Bonus Software xplained how to
  11. play my chip-muzaxx. As the format is xactly the Mad Max', his routine
  12. worked perfectly, but my utility also allows you to call the muzaxx many
  13. much easier. Indeed, the D0 register doesn't need to be initialized, so a
  14. single CALL instead of a RCALL is possible. Moreover, the second 'BRA' of
  15. my routine calls a sub-routine that stops perfectly the resident-sounds.
  16. Although the WAVE 0,0,0,0 instruction does the same thing, you'd better use
  17. the built-in rout 'coz all YM-registers are reinitialized. My utility can
  18. also use sampled drums. In dis case, you MUST call the second 'BRA' to stop
  19. the muzak, otherwise the interrupts wouldn't be restored and lotsa things
  20. wouldn't work anymore.
  21.  
  22. P.s. There are a lot more GFA ans ASM sources to play music in the
  23. Megatizer folder on disk A. Jedi didn't know at that time that he would
  24. release the Megatizer. (BONUS)
  25.  
  26.  
  27.  
  28. ********************************* GfA-Source *******************************
  29.  
  30. FILESELECT "A:\*.THK","",file$               Choose a file
  31. IF EXIST(file$)=0                            Does it exist ?
  32.   EDIT                                       No => Quit
  33. ENDIF
  34. OPEN "I",#1,file$                            Yes => Let's load it !
  35. muzak$=INPUT$(LOF(#1),#1)                    Load...
  36. CLOSE #1                                     Close...
  37. super%=GEMDOS(&H20,L:0)                      Supervisor mode
  38. muzak%=V:muzak$                              Address of the muzak
  39. CALL muzak%                                  Init. muzak
  40. LONG{&H4D2}=muzak%+8                         Play it
  41. ~GEMDOS(&H20,L:super%)                       -> Back to the user mode
  42.  
  43. ... Here is your program ...
  44.  
  45. super%=GEMDOS(&H20,L:0)                      Supervisor mode anew
  46. LONG{&H4D2}=0                                Don't play anymore
  47. stop%=muzak%+4                               Second 'BRA'
  48. CALL stop%                                   Cut the resident-sounds
  49. ~GEMDOS(&H20,L:super%)                       -> User mode
  50.  
  51.  
  52.  
  53.  
  54. ******************************* Assembly Source ****************************
  55.  
  56.         clr.l -(sp)
  57.         move #$20,-(sp)
  58.         trap #1                              Supervisor mode
  59.         move.l d0,2(sp)                      Save the user stack
  60.         
  61.         bsr muzak                            Init.muzak
  62.         
  63.         move.l #muzak+8,$4d2.w               Play muzak
  64.         
  65. ... Insert your program here ...
  66.  
  67.         clr.l $4d2.w                         Stop muzak
  68.         bsr muzak+4                          Cut resident-sounds
  69.         
  70.         trap #1                              User mode
  71.         addq.l #6,sp
  72.         
  73. ... Insert the end of your program here ( PTERM0, Chaining,... ) ...
  74.  
  75.  
  76.  
  77.  
  78. /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
  79. \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
  80.  
  81.  
  82.     C ya soon in the Bee Forol Demo !!!
  83.         
  84.                             #    ###    ##     #
  85.                             #    ##     # #    #
  86.                           ###    ###    ##     #
  87.                    
  88.                          of Sector One from T.H.K   
  89.                          
  90.